package com.ji.li.reactadminproexampleservice.entity.auth;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.ji.li.reactadminproexampleservice.entity.auth.AuthRole;
import com.ji.li.reactadminproexampleservice.entity.user.User;

/**
 * 授权 用户 角色组 绑定
 */
@TableName(value = "interface_auth_user_role_table")
public class AuthUserRole {

    public void setUrId(int urId) {
        this.urId = urId;
    }

    public void setUserId(int userId) {
        this.userId = userId;
    }

    public void setRoleId(int roleId) {
        this.roleId = roleId;
    }

    public Integer getUrId() {
        return urId;
    }

    public Integer getUserId() {
        return userId;
    }

    public Integer getRoleId() {
        return roleId;
    }

    @Override
    public String toString() {
        return "UserRole{" +
                "urId=" + urId +
                ", userId=" + userId +
                ", roleId=" + roleId +
                ", user=" + user +
                ", role=" + authRole +
                '}';
    }

    @TableId(value = "ur_id",type = IdType.AUTO)
    private Integer urId;
    @TableField(value = "user_id")
    private Integer userId;
    @TableField(value = "role_id")
    private Integer roleId;

    public User getUser() {
        return user;
    }

    public AuthRole getRole() {
        return authRole;
    }

    public void setUser(User user) {
        this.user = user;
    }

    public void setRole(AuthRole authRole) {
        this.authRole = authRole;
    }

    private User user = null;
    private AuthRole authRole = null;
}
